package com.ruoyi.business.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.business.mapper.TDialysisRecordMapper;
import com.ruoyi.business.domain.TDialysisRecord;
import com.ruoyi.business.service.ITDialysisRecordService;

/**
 * 腹膜透析记录Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-03-12
 */
@Service
public class TDialysisRecordServiceImpl implements ITDialysisRecordService 
{
    @Autowired
    private TDialysisRecordMapper tDialysisRecordMapper;

    /**
     * 查询腹膜透析记录
     * 
     * @param status 腹膜透析记录主键
     * @return 腹膜透析记录
     */
    @Override
    public TDialysisRecord selectTDialysisRecordByStatus(String status)
    {
        return tDialysisRecordMapper.selectTDialysisRecordByStatus(status);
    }

    /**
     * 查询腹膜透析记录列表
     * 
     * @param tDialysisRecord 腹膜透析记录
     * @return 腹膜透析记录
     */
    @Override
    public List<TDialysisRecord> selectTDialysisRecordList(TDialysisRecord tDialysisRecord)
    {
        return tDialysisRecordMapper.selectTDialysisRecordList(tDialysisRecord);
    }

    /**
     * 新增腹膜透析记录
     * 
     * @param tDialysisRecord 腹膜透析记录
     * @return 结果
     */
    @Override
    public int insertTDialysisRecord(TDialysisRecord tDialysisRecord)
    {
        tDialysisRecord.setCreateTime(DateUtils.getNowDate());
        return tDialysisRecordMapper.insertTDialysisRecord(tDialysisRecord);
    }

    /**
     * 修改腹膜透析记录
     * 
     * @param tDialysisRecord 腹膜透析记录
     * @return 结果
     */
    @Override
    public int updateTDialysisRecord(TDialysisRecord tDialysisRecord)
    {
        tDialysisRecord.setUpdateTime(DateUtils.getNowDate());
        return tDialysisRecordMapper.updateTDialysisRecord(tDialysisRecord);
    }

    /**
     * 批量删除腹膜透析记录
     * 
     * @param statuss 需要删除的腹膜透析记录主键
     * @return 结果
     */
    @Override
    public int deleteTDialysisRecordByStatuss(String[] statuss)
    {
        return tDialysisRecordMapper.deleteTDialysisRecordByStatuss(statuss);
    }

    /**
     * 删除腹膜透析记录信息
     * 
     * @param status 腹膜透析记录主键
     * @return 结果
     */
    @Override
    public int deleteTDialysisRecordByStatus(String status)
    {
        return tDialysisRecordMapper.deleteTDialysisRecordByStatus(status);
    }
}
